package cn.idietrade.idietradegoodsmodule8002.service.carservice;

import cn.idietrade.common.pojo.SecondShoppingCart;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SecondShoppingCartService {
    //通过登录用户id查询当前用户的购物车
    List<SecondShoppingCart> queryShoppingCartUId(Integer userId,Integer goodsId);

    //删除购物车商品
    int deleShoppingGoods(Integer userId,Integer goodsId);

    //商品加入购物车
    int addShoppingGoods(Integer userId,Integer goodsId);
    int updateAddShoppingGoods(@Param("userId")Integer userId,@Param("goodsId")Integer goodsId);

    //添加购物车前判断该商品是否存在
    int selectOneShoppingGoods(Integer userId,Integer goodsId);

    //修改购物车数量
    int updateShoppingCart(Integer userId, Integer goodsId,Integer num);
}
